package com.jcfk.eam.dao.main;

import com.jcfk.common.business.dao.BaseDao;
import com.jcfk.common.web.domain.DataPage;
import com.jcfk.eam.domain.po.main.EamRepairOrderPart;
import com.jcfk.eam.domain.query.main.EamRepairOrderPartQuery;
import com.jcfk.eam.domain.dto.main.EamRepairOrderPartDTO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 计划维修备件清单
 *
 * @author awei
 * @email 522891237@gqq.com
 * @date 2024-09-06
 */
@Repository
public interface EamRepairOrderPartDao extends BaseDao<EamRepairOrderPart> {
    /**
     * 计划维修备件清单分页查询
     *
     * @param page
     * @param query
     * @return
     */
    DataPage<EamRepairOrderPartDTO> queryByPage(@Param("page") DataPage<EamRepairOrderPartDTO> page, @Param("query") EamRepairOrderPartQuery query);

    /**
     * 根据维修单获取维修备件和备件的详细信息
     * @param repairId 维修单id
     * @return 维修备件和备件的详细信息
     */
    List<EamRepairOrderPartDTO> queryPartListByRepair(@Param("repairId") String repairId);
}
